package com.shop.entity;
/*CREATE TABLE ordergoodsList (
   `id` BIGINT(16) NOT NULL auto_increment PRIMARY KEY COMMENT '商品编号',
   `quantity` INT NOT NULL COMMENT '商品数量',
   `discount` DOUBLE COMMENT '商品折扣',
   `color` VARCHAR(16) COMMENT '商品颜色',
   `size` CHAR(4) COMMENT '商品尺寸',
   `goods_id` BIGINT(16) COMMENT '商品编号',
   `merchantorder_id` BIGINT(16) COMMENT '商户订单编号（外键）',
   foreign key (`merchantorder_id`) references merchantorder(`id`)   
)ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;*/
/**
 * 
 * <b>订单中的细分商品清单表<b>
 * @author 威 
 * <br>2018年1月2日 下午2:47:06 
 *
 */
public class OrderGoodsList {
	private Integer id ;
	private Integer quantity ;
	private Double discount ;
	private String color ;
	private String size ;
	private Integer goods_id ;					
	private MerchantOrder merchantOrder ;	//商户订单外键	n:1
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Integer getQuantity() {
		return quantity;
	}
	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}
	public Double getDiscount() {
		return discount;
	}
	public void setDiscount(Double discount) {
		this.discount = discount;
	}
	public String getColor() {
		return color;
	}
	public void setColor(String color) {
		this.color = color;
	}
	public String getSize() {
		return size;
	}
	public void setSize(String size) {
		this.size = size;
	}
	public Integer getGoods_id() {
		return goods_id;
	}
	public void setGoods_id(Integer goods_id) {
		this.goods_id = goods_id;
	}
	public MerchantOrder getMerchantOrder() {
		return merchantOrder;
	}
	public void setMerchantOrder(MerchantOrder merchantOrder) {
		this.merchantOrder = merchantOrder;
	}
	public String toString(){
		return "OrderGoodsList[id="+this.id+
				",quantity="+this.quantity+
				",discount="+this.discount+
				",color="+this.color+
				",size="+this.size+
				",goods_id="+this.goods_id+
				",merchantOrderId="+this.merchantOrder.getId()+
				"]" ; 
	}
}
